Component({
      data: {
        selected: 0,
        color: "#000",
        selectedColor: "#000",
        list: [{
          index:0,
          pagePath: "/pages/index/index",
          iconPath: "/icon/select-home.png",
          selectedIconPath: "/icon/home.png",
          text: "首页"
        }, {
          index:1,
          pagePath: "/pages/home/home",
          iconPath: "/icon/select-user.png",
          selectedIconPath: "/icon/user.png",
          text: "我的"
        }]
      },
      attached() {
      },
      methods: {
        switchTab(e) {
          const data = e.currentTarget.dataset
          const url = data.path
          wx.switchTab({url})
          getApp().globalData.index=data.index;
        }
      }
})